/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Registers.java
 *
 * Created on 21.09.2011., 20.55.34
 */
package aor2.gui.cpu.testiranje;

import aor2.gui.cpu.JLabelSet;

/**
 * 
 * @author Moxi
 */
public class Registers extends javax.swing.JPanel {
	// TODO radna verzija, zavrsiti
	/** Creates new form Registers */
	public Registers() {
		initComponents();
		r0 = new JLabelSet(false, jLabel2, jLabel3, jLabel4);
	}

	JLabelSet r0;// = new JLabelSet(false, jLabel2, jLabel3, jLabel4);

	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */
	@SuppressWarnings("unchecked")
	// <editor-fold defaultstate="collapsed"
	// desc="Generated Code">//GEN-BEGIN:initComponents
	private void initComponents() {
		java.awt.GridBagConstraints gridBagConstraints;

		jLayeredPane1 = new javax.swing.JLayeredPane();
		jLabel2 = new javax.swing.JLabel();
		jLabel3 = new javax.swing.JLabel();
		jLabel4 = new javax.swing.JLabel();
		jToggleButton1 = new javax.swing.JToggleButton();
		jLabel1 = new javax.swing.JLabel();

		setLayout(new java.awt.GridBagLayout());

		jLabel2.setIcon(new javax.swing.ImageIcon(
				"C:\\Users\\Moxi\\Desktop\\operacioni_blok\\horiz_1pt_1.jpg")); // NOI18N
		jLabel2.setDisabledIcon(new javax.swing.ImageIcon(
				"C:\\Users\\Moxi\\Desktop\\operacioni_blok\\horiz_1pt_0.jpg")); // NOI18N
		jLabel2.setEnabled(false);
		jLabel2.setPreferredSize(new java.awt.Dimension(1043, 2));
		jLabel2.setBounds(330, 160, 90, 20);
		jLayeredPane1.add(jLabel2, javax.swing.JLayeredPane.DEFAULT_LAYER);

		jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"/aor2/common/resources/vert_1pt_1.jpg"))); // NOI18N
		jLabel3.setDisabledIcon(new javax.swing.ImageIcon(getClass()
				.getResource("/aor2/common/resources/vert_1pt_0.jpg"))); // NOI18N
		jLabel3.setEnabled(false);
		jLabel3.setMaximumSize(new java.awt.Dimension(2, 715));
		jLabel3.setMinimumSize(new java.awt.Dimension(2, 715));
		jLabel3.setPreferredSize(new java.awt.Dimension(2, 715));
		jLabel3.setBounds(420, 45, 10, 120);
		jLayeredPane1.add(jLabel3, javax.swing.JLayeredPane.DEFAULT_LAYER);

		jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"/aor2/common/resources/horiz_1pt_1.jpg"))); // NOI18N
		jLabel4.setDisabledIcon(new javax.swing.ImageIcon(getClass()
				.getResource("/aor2/common/resources/horiz_1pt_0.jpg"))); // NOI18N
		jLabel4.setEnabled(false);
		jLabel4.setBounds(420, 40, 90, 10);
		jLayeredPane1.add(jLabel4, javax.swing.JLayeredPane.DEFAULT_LAYER);

		jToggleButton1.setText("r0 change");
		jToggleButton1.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				jToggleButton1ActionPerformed(evt);
			}
		});
		jToggleButton1.setBounds(70, 50, 83, 23);
		jLayeredPane1.add(jToggleButton1,
				javax.swing.JLayeredPane.DEFAULT_LAYER);

		gridBagConstraints = new java.awt.GridBagConstraints();
		gridBagConstraints.gridx = 0;
		gridBagConstraints.gridy = 0;
		gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
		gridBagConstraints.weightx = 1.0;
		gridBagConstraints.weighty = 1.0;
		add(jLayeredPane1, gridBagConstraints);

		jLabel1.setIcon(new javax.swing.ImageIcon(
				"C:\\Users\\Moxi\\Desktop\\operacioni_blok\\registri R - color.png")); // NOI18N
		gridBagConstraints = new java.awt.GridBagConstraints();
		gridBagConstraints.gridx = 0;
		gridBagConstraints.gridy = 0;
		gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
		gridBagConstraints.weightx = 1.0;
		gridBagConstraints.weighty = 1.0;
		add(jLabel1, gridBagConstraints);
	}// </editor-fold>//GEN-END:initComponents

	private void jToggleButton1ActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jToggleButton1ActionPerformed
		if (r0.isEnabled())
			r0.disable();
		else
			r0.enable();
		repaint();
	}// GEN-LAST:event_jToggleButton1ActionPerformed

	// Variables declaration - do not modify//GEN-BEGIN:variables
	private javax.swing.JLabel jLabel1;
	private javax.swing.JLabel jLabel2;
	private javax.swing.JLabel jLabel3;
	private javax.swing.JLabel jLabel4;
	private javax.swing.JLayeredPane jLayeredPane1;
	private javax.swing.JToggleButton jToggleButton1;
	// End of variables declaration//GEN-END:variables
}
